package com.ww.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ww.service.DemoService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wangwei
 * @date 2019/1/10 17:42
 */
@RestController
public class DemoConsumerController {

    @Reference(version = "1.0.0")
    private DemoService demoService;

    @RequestMapping("/hello/{name}")
    public String hello(@PathVariable("name") String name){
        return demoService.sayHello(name);
    }


    @RequestMapping("/hello1")
    public String hello(){
        return demoService.sayHello("1111");
    }

}